# !/usr/bin/env python
# encoding: utf-8


"""
  @author: gaogao
  @file: N5225B_App.py
  @time: 2022/3/11 16:47
  @desc:
"""

from ATS.instrumentDriver.InstGenVNA.InstGenVNA_N5225B import VNA_N5225B


class N5225BApp:
    def __init__(self, name):
        self.n5225b_app = VNA_N5225B(name)
        self.set_data_format()

    def init(self):
        self.n5225b_app.init_macro()

    def set_data_format(self):
        self.n5225b_app.set_data_format()

    def start_trigger(self):
        return self.n5225b_app.start_trigger()

    def get_cf_center(self, bw_seatch=3):
        return self.n5225b_app.cf_center(bw_seatch)

    def search_bw(self, target_value=-3):
        return self.n5225b_app.search_bw(target_value)

    def get_specific_marker_value(self, trace_num=2):
        return self.n5225b_app.get_specific_marker_value(trace_num)

    def get_snp_data(self):
        return self.n5225b_app.get_snp_data()

    def get_x_y_trace_data(self, trace_num=1):
        return self.n5225b_app.get_x_y_trace_data(trace_num)

    def get_points(self):
        return self.n5225b_app.get_points()
